If the icon is painted before the new shadow is around, a stale
shadow material will be painted with a NULL shadow spec, resulting
in a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=679776
st_shadow_unref (priv->shadow_spec);
priv->shadow_spec = NULL;
}
+
+ if (priv->shadow_material)
+ {
+ cogl_handle_unref (priv->shadow_material);
+ priv->shadow_material = COGL_INVALID_HANDLE;
+ }
+
priv->shadow_spec = st_theme_node_get_shadow (theme_node, "icon-shadow");
if (priv->shadow_spec && priv->shadow_spec->inset)